using Blm.Utils.Extensions;
using System;
using System.ComponentModel.DataAnnotations;
using VisionCloud.Core.Model.Sys;
using VisionCloud.Domain.Common;
using static VisionCloud.Core.Model.Sys.SysLog;

namespace VisionCloud.Domain.DtoModel.Sys
{
    /// <summary>
    /// 表单新增
    /// </summary>
    public class LogAddView
    {
    }

    /// <summary>
    /// 表单修改
    /// </summary>
    public class LogUpdateView : LogAddView
    {
        [Required]
        public int Id { get; set; }
    }

    /// <summary>
    /// 查询
    /// </summary>
    public class LogQueryView : PageBase
    {
        public SysLog.EmLogType LogType { get; set; }
        public string CreatedByName { get; set; }
        public DateTime? CreatedDate { get; set; }
        public DateTime? CreatedDateFrom { get; set; }
        public DateTime? CreatedDateTo { get; set; }
    }

    /// <summary>
    /// 列表
    /// </summary>
    public class LogListView
    {
        public LogListView(SysLog entity)
        {
            entity.CopyTo(this);
        }

        public int Id { get; set; }

        public DateTime CreatedDate { get; set; }
        public string CreatedByName { get; set; }
        public string Ip { get; set; }
        public string SystemModule { get; set; }
        public EmLogType LogType { get; set; }
        public string LogTypeStr { get; set; }
        public EmExecResult ExecResult { get; set; }
        public string Description { get; set; }
    }
}